package cn.yitun.chat.yitunservercommonlib.converter.dto2po.user;

import cn.yitun.chat.yitunservercommonlib.crud.yitun.BaseConverter;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.system.user.UserDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.system.user.UserInfo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 用户
 */
@Mapper(componentModel = "spring")
public interface UserDto2PoConverter extends BaseConverter<UserDto, UserInfo> {

    UserDto2PoConverter INSTANCE = Mappers.getMapper(UserDto2PoConverter.class);

    UserDto do2dto(UserInfo info);

    List<UserDto> do2dto(List<UserInfo> doList);

    @InheritInverseConfiguration
    UserInfo dto2do(UserDto dto);
    @InheritInverseConfiguration
    List<UserInfo> dto2do(List<UserDto> dtoList);

}
